package testingtool.regex;

import java.util.regex.Pattern;

public class TestPattern {

	public static void main(String[] args) {
		String ss[] = new String[12];
		ss[0] = "8";
		ss[1] = "0";
		ss[2] = "00";
		ss[3] = "001";
		ss[4] = "m0";
		ss[5] = "m4";
		ss[6] = "   ";
		ss[7] = "  0";
		ss[8] = "-";
		ss[9] = "#";
		ss[10] = "  10";
		ss[11] = "  1aa0";
		
		for(String s : ss){
			
			if(Pattern.matches("^[A-Za-z0-9]+$", s.trim()) && !Pattern.matches("^0+$", s.trim())){
				System.out.println("#"+s + "#............yes");
			}else{
				System.out.println("#"+s + "#............no");
			}
		}
	}
}
